import java.net.URL;

import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.Clip;
import javax.swing.JFrame;


public class FirstGameFrame extends JFrame {
	
	
	public FirstGameFrame(){
		initUI();
	}
	private void initUI(){
		setTitle("When the moon is low...");
		setSize(800,600);
		setResizable(false);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
		//////////////////////////////////////////////
//		try{
//			URL url = getClass().getResource("opennig.wav");	
//			Constants.openning = AudioSystem.getAudioInputStream(url);
//			url = getClass().getResource("running.wav");	
//			Constants.running = AudioSystem.getAudioInputStream(url);
//			url = getClass().getResource("gameover.wav");	
//			Constants.gameover = AudioSystem.getAudioInputStream(url);
//		}catch(Exception ex){
//			ex.printStackTrace();
//		}
		
		/////////////////////////////////////////
//		OpenScreen open = new OpenScreen();
		MainPanel open = new MainPanel();

//		MainScreen screen = new MainScreen();
//		screen.setFocusable(true);//컴포넌트가 이벤트를 수신할 수 있도록 설정(명시적으로 너는 이벤트를 받는애다!)
//		screen.setSize(Constants.SCREEN_WIDTH,Constants.SCREEN_HEIGHT);
//		add(screen);
		add(open);
		
	}
	
	public static void main(String[] args){
		FirstGameFrame frame = new FirstGameFrame();
		frame.setVisible(true);
	}

}
